'''def fib(n):
    if n==1:
        return 1
    elif n==2:
        return 1
    else:
        return fib(n-2)+fib(n-1)
print(fib(6))
print('----------------------')
for i in range(1,7):
    print(fib(i))'''
scores={'张三':100,'李四':98,'王五':45}
'''for item in scores:
    print(item,scores[item],scores.get(item))'''
'''for i in scores:
    list=scores[i]
print(list)'''
lst=[{'rating':[9.7,2062397],'id':'1292052','type':['犯罪','剧情'],'title':'肖申克的救赎','actors':['蒂姆','摩根']},
    {'rating':[9.6,1528760],'id':'1291546','type':['剧情','爱情','同性'],'title':'霸王别姬','actors':['张国荣','张丰毅','巩俐','葛优']},
    {'rating':[9.5,1559181],'id':'1292720','type':['剧情','爱情'],'title':'阿甘正传','actors':['汤姆','罗宾']}]
name=input('请输入你要查询的演员：')
for item in lst:#遍历列表 --> item是一个又一个的字典
    act_lst=item['actors']
    for actor in act_lst:
        if name==actor:
            print(name,'出演了',item['title'])








